<template>
  <div class="wrapper login" :style="'background:url('+bg+')'">
    <div class="loginCont">
      <div class="title"><b>登 录</b></div>
      <el-form :model="user" ref="userForm">
        <el-form-item>
          <el-input style="margin: 10px 0" v-model="user.username" />
        </el-form-item>
        <el-form-item>
          <el-input style="margin: 10px 0" show-password v-model="user.password" />
        </el-form-item>
        <el-form-item style="margin: 10px 0; text-align: right">
          <el-button type="primary" class="loginBtn" autocomplete="off" @click="login">登录</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
import bg from '@/assets/loadingbg.svg'
export default {
  name: "Login",
  data() {
    return {
      user: {
        username:'',
        password:''
      },
      bg:bg
    }
  },
  created() {
    // console.log("created");
  },
  methods: {
    login(){
      
    }
  }
}
</script>

<style lang="scss">
  .wrapper {
    height: 100vh;
    overflow: hidden;
    background-size:cover;
  }
  .login{
      .title{
          margin: 20px 0; text-align: center; font-size: 24px
      }
      .loginCont{
          margin: 200px auto; background-color: #fff; width: 350px; height: 300px; padding: 20px; border-radius: 10px
      }
      .loginBtn{
          width:100%;
      }
  }
</style>
